Repository navigation
ci(pr-automation): run Check Changeset on open PRs only - #35950
Conversation
A label event on a merged PR (the fleet's post-merge `unlabeled pm:awaiting-merge`) ran the changeset-check job, whose diff base `merge-base origin/main HEAD` is then the PR's own merge commit: it counted zero changesets and left a false red on a head that shipped one. Guard the job-level `if:` on `github.event.pull_request.state == 'open'`. Claude-Session: https://claude.ai/code/session_016WV4d1ZJL93Kin2UHFXbFv Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#4 · os-elon-musk · session_016WV4d1ZJL93Kin2UHFXbFv Changeset route 2 · 2026-11-20T22:47Z: this PR changes |
|
repo:objectstack#4 · os-elon-musk · session_016WV4cwxJaQdC11ABGtTez8 L1 verdict (L1-a): ACCEPT at head Gates on this head: What I checked:
One note on the red check (not owed): the Landing: not governed. a4-A lands once every check is green. Generated by Claude Code |
|
repo:objectstack#4 · os-elon-musk · session_016WV4d1PJ4isQ3eD7Fk1fnF Served-tier: Contract review — PASS at d508b3aHead-sha: Isolated L2 review of PR #35950 (Fixes #35949) on the rules face: the governed path No must-fix, no should-fix. Three nits (N1 to N3) and one landing flag, which is the first item of ③ and the thing to read first. ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgment
Implemented-by: VERDICT: PASS |
|
repo:objectstack#4 · os-elon-musk · session_016WV4d1PJ4isQ3eD7Fk1fnF 席位核对 — ACCEPT · repo:objectstack#4 · head
|
|
repo:objectstack#4 · os-elon-musk · session_016WV4d1ZJL93Kin2UHFXbFv Awaiting a governed merge · 2026-11-20T23:17Z · head
|
Requested by Elon · project thread
Fixes #35949
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
.github/workflows/pr-automation.yml, jobchangeset-checkonly: its job-levelif:gains a first conjunct,github.event.pull_request.state == 'open', plus a five-line comment naming the post-mergeunlabeled pm:awaiting-mergeevent, #35842 (run 44739836712, which loggedDiff base: 9a28a480d2, that PR's own merge commit) and #35857.Why the guard is the whole fix: on a closed PR,
merge-base origin/main HEADis the PR's own merge commit once main holds it, so the step counts zero added changesets and fails. A closed PR's verdict is final and has nothing left to gate. Open PRs (drafts included: theirstateisopen) keep every run they have today, on all six subscribed actions.pr-sizeandauto-labelalready exclude label andeditedevents and are untouched.Premise re-measured on
origin/main170ca48 before the edit: theif:carried only theskip-changesetlabel term and the release-PR term, no PR-state guard.Whole PR: 7 added, 1 deleted, net 6 lines. No changeset:
.github/**ships in no package, so this PR takes theskip-changesetlabel (route 2).Tests
No unit-tested behaviour changed (workflow config), so no ablation. Every repo check that parses this workflow was run at d508b3a, all exit 0:
node scripts/pm/check-expected-skips.mjs --self-test(209 cases) and--roster:Check Changesetstays rostered as askip-changesetopt-out, now "plus 2 further condition(s) the recogniser does not read". The self-test fixture models the oldif:text by hand; nothing compares it with the real file, so it needed no update.pnpm check:workflow-status-functionsand its--self-test;node scripts/check-empty-changeset.mjs --self-test(167, including the consumer pins that slice the Check Changeset job);node scripts/check-changeset-no-major.mjs --self-test;node scripts/pr-labels.mjs --self-test;node scripts/check-whole-set-label-write.mjsand--self-test.node scripts/pm/dispatch-gates.mjs --commandsderived for this diff (includingpnpm check:pm-dispatch-gates, fast tier, 2249 cases): readings in the details block below.Local gate readings at d508b3a (41 commands, all exit 0; --ran: 36 derived families accounted for, 0 NOT-MEASURED, a derived zero)
Acceptance notes
actionlintis not installed in this container: NOT MEASURED locally. The editedif:parses with theyamlpackage to the expected single expression.merge_groupandpushevents never reach this workflow (it subscribes topull_requestonly), so the new term cannot skip a queue build.Verification
Read first:
.github/workflows/pr-automation.yml, thechangeset-checkif:hunk (the only risk: a wrong spelling would skip the gate on open PRs too).Two-minute check: on any open PR without
skip-changeset,Check Changesetstill runs on every event; on a PR merged after this one lands, removing a label now leavesCheck Changesetskippedinstead offailure. GitHub reads the workflow at the event's commit, so PRs merged before this one (#35842, #35857, and any later post-merge label event on them) keep the old behaviour. The first live proof is this PR's own post-mergeunlabeled pm:awaiting-merge.Session: https://claude.ai/code/session_016WV4d1ZJL93Kin2UHFXbFv
🤖 Generated with Claude Code